home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / tools / developer-tools / aros / source / exec / internal / m68k / m68k-native / permit.s < prev    next >
Encoding:
Text File  |  1996-07-16  |  1.0 KB  |  59 lines

  1. |*****************************************************************************
  2. |
  3. |   NAME */
  4. |
  5. |    __AROS_LH0(void, Permit,
  6. |
  7. |   LOCATION
  8. |    struct ExecBase *, SysBase, 23, Exec)
  9. |
  10. |   FUNCTION
  11. |    This function activates the dispatcher again after a call to Permit().
  12. |
  13. |   INPUTS
  14. |
  15. |   RESULT
  16. |
  17. |   NOTES
  18. |    This function preserves all registers.
  19. |
  20. |   EXAMPLE
  21. |
  22. |   BUGS
  23. |
  24. |   SEE ALSO
  25. |    Forbid(), Disable(), Enable()
  26. |
  27. |   INTERNALS
  28. |
  29. |   HISTORY
  30. |
  31. |******************************************************************************
  32.  
  33.     Switch        =    -0x24
  34.     IDNestCnt   =    0x126
  35.     TDNestCnt   =    0x127
  36.     AttnResched =    0x12a
  37.  
  38.     .globl    _Exec_Permit
  39. _Exec_Permit:
  40.     | decrement nesting count and return if there are Forbid()s left
  41.     subqb    #1,a6@(TDNestCnt)
  42.     jpl    end
  43.  
  44.     | return if there are no delayed switches pending.
  45.     tstb    a6@(AttnResched+1)
  46.     jpl    end
  47.  
  48.     | if IDNestCnt is not -1 taskswitches are still forbidden
  49.     tstb    a6@(IDNestCnt)
  50.     jpl    end
  51.  
  52.     | Unset delayed switch bit and do the delayed switch
  53.     bclr    #7,a6@(0x12b)
  54.     jsr    a6@(Switch)
  55.  
  56.     | all done.
  57. end:    rts
  58.  
  59.